import Vue from 'vue'
import Router from 'vue-router'
// import HelloWorld from '@/components/HelloWorld'
import Login from '@/views/Login.vue'
import Home from '@/views/home/home.vue'
import empty from '@/views/empty.vue'

//查询
import chaxunNumber from '@/views/chaxun/cx-number.vue'
import chaxunIndex from '@/views/chaxun/cx-index.vue'
import chaxunDetails2 from '@/views/chaxun/cx-details2.vue'
import chaxunDetails from '@/views/chaxun/cx-details.vue'
import chaxunXiugai from '@/views/chaxun/cx-xiugai.vue'

//巡检
import xunjianIndex from '@/views/xunjian/xj-index.vue'
import xunjianDetails from '@/views/xunjian/xj-details.vue'
import xunjianDetails2 from '@/views/xunjian/xj-details2.vue'
import xunjianTask from '@/views/xunjian/xj-task.vue'

//保养
import baoyangIndex from '@/views/baoyang/by-index.vue'
import baoyangDetails from '@/views/baoyang/by-details.vue'
import baoyangDianwei from '@/views/baoyang/by-dianwei.vue'

//维修
import weixiuIndex from '@/views/weixiu/wx-index.vue'
import weixiuDetails from '@/views/weixiu/wx-details.vue'
import weixiuQueren from '@/views/weixiu/tab/wx-queren.vue'

//故障
import guzhangIndex from '@/views/guzhang/gz-index.vue'
import guzhangShangbao from '@/views/guzhang/gz-shangbao.vue'



Vue.use(Router)

export default new Router({
    routes: [{
            path: '/',
            redirect: '/home'
        },
        {
            path: '/login',
            name: 'login',
            component: Login
        },
        {
            path: '/home',
            name: 'home',
            component: Home
        },
        {
            path: '/chaxun',
            name: 'empty',
            component: empty,
            redirect: {
                name: 'chaxunNumber'
            },
            children: [{
                    path: 'number',
                    name: 'chaxunNumber',
                    component: chaxunNumber,
                }, {
                    path: 'index',
                    name: 'chaxunIndex',
                    component: chaxunIndex,
                },
                {
                    path: 'details',
                    name: 'chaxunDetails',
                    component: chaxunDetails,
                },
                {
                    path: 'xiugai',
                    name: 'chaxunXiugai',
                    component: chaxunXiugai,
                }, {
                    path: 'details2',
                    name: 'chaxunDetails2',
                    component: chaxunDetails2,
                }
            ]
        },
        {
            path: '/xunjian',
            name: 'empty',
            component: empty,
            redirect: {
                name: 'xunjianIndex'
            },
            children: [{
                    path: 'index',
                    name: 'xunjianIndex',
                    component: xunjianIndex,
                },
                {
                    path: 'details',
                    name: 'xunjianDetails',
                    component: xunjianDetails,
                },
                {
                    path: 'details2',
                    name: 'xunjianDetails2',
                    component: xunjianDetails2,
                },
                {
                    path: 'task',
                    name: 'xunjianTask',
                    component: xunjianTask,
                }
            ]
        },
        {
            path: '/baoyang',
            name: 'empty',
            component: empty,
            redirect: {
                name: 'baoyangIndex'
            },
            children: [{
                    path: 'index',
                    name: 'baoyangIndex',
                    component: baoyangIndex,
                },
                {
                    path: 'details',
                    name: 'baoyangDetails',
                    component: baoyangDetails,
                },
                {
                    path: 'dianwei',
                    name: 'baoyangDianwei',
                    component: baoyangDianwei,
                }
            ]
        },
        {
            path: '/weixiu',
            name: 'empty',
            component: empty,
            redirect: {
                name: 'weixiuIndex'
            },
            children: [{
                    path: 'index',
                    name: 'weixiuIndex',
                    component: weixiuIndex,
                },
                {
                    path: 'details',
                    name: 'weixiuDetails',
                    component: weixiuDetails,
                },
                {
                    path: 'queren',
                    name: 'weixiuQueren',
                    component: weixiuQueren,
                }
            ]
        },
        {
            path: '/guzhang',
            name: 'empty',
            component: empty,
            redirect: {
                name: 'guzhangIndex'
            },
            children: [{
                path: 'index',
                name: 'guzhangIndex',
                component: guzhangIndex,
            }, {
                path: 'shangbao',
                name: 'guzhangShangbao',
                component: guzhangShangbao,
            }]
        }
    ]
})